const Query = require('./dest/lib.query.min')

function parse(param) {
    console.log(param)
    console.log(JSON.stringify(Query.toESQuery(Query.parse(param)), null, 4), '\n')
}

parse(`date>='2004-03-22'`)
parse(``)
parse(`-group:es group:kibana -group:beats group:logstash`)
parse(`is:online group:kibana john`)
parse(`john -doe is:online group:eng group:es -group:kibana -is:active`)
parse(`john -sales`)
parse(`john group:(eng or "marketing org") -group:"kibana team"`)
parse(`john group:(eng or es) -group:kibana`)
parse(`(name:john OR name:fred)`)
parse(`(name:john)`)
parse(`-count<=4 size<5 age>=3 -number>9`)
parse(`count>3`)
parse(`date:'2004-03' -date<'2004-03-10'`)
parse(`date>'2004-02' -otherDate>='2004-03-10'`)
parse(`date>='2004-03-22'`)
parse(`name:"First \\"Nickname\\" Last"`)
parse(`name:john (is:enrolled OR Teacher)`)
